
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="MOBAN">

<meta name="description" content="">
<meta name="keywords" content="bootstrap, bootstrap5">
<link href="static/css/css2.css" rel="stylesheet">
<link rel="stylesheet" href="static/css/style.css">
<link rel="stylesheet" href="static/css/flaticon.css">
<link rel="stylesheet" href="static/css/bootstrap-icons.css">
<link rel="stylesheet" href="static/css/tiny-slider.css">
<link rel="stylesheet" href="static/css/aos.css">
<link rel="stylesheet" href="static/css/glightbox.min.css">
<link rel="stylesheet" href="static/css/style1.css">
<link rel="stylesheet" href="static/css/flatpickr.min.css">
<link rel="short icon" href="images/28.jpg">
<title>知文招标网 - 首页</title>
	<style>

		*{padding: 0; margin: 0}
		.slider {
			position: relative;
			height: 400px;
			width: 100%;
			overflow: hidden;
		}
		.slider .slider-pointer {
			position: absolute;
			bottom: 20px;
			color: #fff;
			list-style: none;
			padding: 0;
			z-index: 999;
		}
		.slider .slider-pointer li {
			display: inline-block;
			margin: 0 15px;
			width: 15px;
			height: 15px;
			border-radius: 15px;
			background-color: #ffffff;
			opacity: 0.85;
			box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.5);
			transition: all 320ms ease;
		}
		.slider .slider-pointer li:hover {
			background-color: #e30006;
		}
		.slider .slider-pointer li.active {
			background-color: #b00005;
		}
		.slider .slider-inner {
			width: 100%;
			height: 100%;
			position: relative;
		}
		.slider .slider-inner .item {
			width: 100%;
			height: 100%;
			float: left;
		}
		.slider .slider-inner .img {
			background-position: center top !important;
			width: 100%;
			height: 100%;
		}
		.slider .slider-control {
			position: absolute;
			width: 30px;
			height: 30px;
			z-index: 999;
			border-radius: 30px;
			text-align: center;
			font-weight: 900;
			font-size: 20px;
			line-height: 30px;
			background-color: #ffffff;
			opacity: 0.5;
			cursor: pointer;
			top: 40%;
			box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.5);
			transition: all 320ms ease;
		}
		.slider .slider-control:hover {
			opacity: 0.65;
			background-color: #b00005;
		}
		.slider .slider-control:active {
			opacity: 0.85;
		}
		.slider .slider-control.prev {
			display: none;
			left: 20px;
		}
		.slider .slider-control.next {
			display: none;
			right: 20px;
		}
		.slider:hover .slider-control.prev {
			display: block;
			left: 20px;
		}
		.slider:hover .slider-control.next {
			display: block;
			right: 20px;
		}
		.mouseMove:hover{
			background-color: yellow;
		}
	</style>
</head>
<body>
 
	<div class="site-mobile-menu site-navbar-target">
		<div class="site-mobile-menu-header">
			<div class="site-mobile-menu-close">
				<span class="icofont-close js-menu-toggle"></span>
			</div>
		</div>
		<div class="site-mobile-menu-body"></div>
	</div>
	<nav class="site-nav">
		<div class="container"  id="chw">
			<div class="menu-bg-wrap">
				<div class="site-navigation">
					<div class="row g-0 align-items-center">
						<div class="col-2">
							<a href="index.html" class="logo m-0 float-start">知文项目管理<span
								class="text-primary">.</span></a>
						</div>
						<div class="col-8 text-center">
							<form action="#" class="search-form d-inline-block d-lg-none">
								<input type="text" class="form-control" placeholder="搜索..." id="phoneSearch">
								<span class="bi-search"></span>
							</form>
							<ul
								class="js-clone-nav d-none d-lg-inline-block text-start site-menu mx-auto">
								<li class="active"><a href="index.html">首页</a></li>
								
								<li class="allPost has-children">
									<a href="blog.html">项目公告</a>
									<ul class="dropdown">
										<li><a href="searchType.html?type=1">招标公告</a></li>
										<li><a href="searchType.html?type=2">中标公告</a></li>
										<li><a href="searchType.html?type=3">其他公告</a></li>
									</ul>
								</li>
								<li><a href="category.html">公司新闻</a></li>
								<li><a href="laws.html">法律法规</a></li>
								<li><a href="about.html">关于我们</a></li>
							</ul>
						</div>
						<div class="col-2 text-end">
							<a href="#"
								class="burger ms-auto float-end site-menu-toggle js-menu-toggle d-inline-block d-lg-none light">
								<span></span>
							</a>
							<form action="" onsubmit="return false" class="search-form d-none d-lg-inline-block">
								<input type="text" class="form-control" placeholder="搜索..." id="searchContent" @keydown.enter="search">
								<span class="bi-searchs"></span>
							</form>
						</div>
						
					</div>
				</div>
			</div>
		</div>
	</nav>
	<div class="slider" id="slider" style="max-width: 100%">
		<div class="slider-inner">
			<div class="item">
				<img class="img" style="background: url('images/bg1.jpg');width: 100%;height:100%;object-fit: contain !important;background-position: center center !important;">
			</div>
			<div class="item">
				<img class="img" style="background: url('images/bg2.jpg');width: 100%;height:100%;object-fit: contain !important;background-position: center center !important;">
			</div>
			<div class="item">
				<img class="img" style="background: url('images/bg3.jpeg');width: 100%;height:100%;object-fit: contain !important;background-position: center center !important;">
			</div>
		</div>
	</div>

<div class="cbt">
	<section class="section bg-light">
		<div class="container">
			<div class="row mb-4">
		    <div class="col-sm-6">
					<img src="images/new.png" style="height:40px;weight:40px">
					<span class="posts-entry-title" style="color:red">最新公告</span>
			</div>
			<div class="col-sm-6 text-sm-end">
				<a href="blog.html" class="read-more">更多</a>
			</div>
			</div>
			<div  v-for="item in topBdTenders" style="height: 100% !important;">
					<span style="font-family:  微软雅黑, sans-serif;">[{{item.createDate.split(" ")[0]}}]</span>
					<a href="javascript:void(0)" class="h-entry mb-30 v-height gradient mouseMove" @click="toDetails(item)" >
						{{item.title}}
					</a>
			</div>
		</div>

	</section>


	<section class="section posts-entry">
		<div class="container">
			<div class="row mb-4">
				<div class="col-sm-6">
					<img src="images/hot2.png" style="height:30px;width:30px">
					<span class="posts-entry-title" style="color:red">浏览最多</span>
				</div>
				<div class="col-sm-6 text-sm-end">
					<a href="blog.html" class="read-more">更多</a>
				</div>
			</div>
			<div  v-for="item in hotPosts" style="height: 100% !important;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;" >
				<span style="font-family:  微软雅黑, sans-serif;">[{{item.createDate.split(" ")[0]}}]</span>
				<a href="javascript:void(0)" class="h-entry mb-30 v-height gradient mouseMove" @click="toDetails(item)" >
					{{item.title}}
				</a>
			</div>
		</div>
	</section>
</div>
<div id="overlayer"></div>
	<div class="loader">
		<div class="spinner-border text-primary" role="status">
			<span class="visually-hidden">Loading...</span>
		</div>
	</div>
	<script src="static/js/bootstrap.bundle.min.js"
		type="0004e70497c5ab5598e782b7-text/javascript"></script>
	<script src="static/js/tiny-slider.js"
		type="0004e70497c5ab5598e782b7-text/javascript"></script>
	<script src="static/js/flatpickr.min.js"
		type="0004e70497c5ab5598e782b7-text/javascript"></script>
	<script src="static/js/aos.js"
		type="0004e70497c5ab5598e782b7-text/javascript"></script>
	<script src="static/js/glightbox.min.js"
		type="0004e70497c5ab5598e782b7-text/javascript"></script>
	<script src="static/js/navbar.js"
		type="0004e70497c5ab5598e782b7-text/javascript"></script>
	<script src="static/js/counter.js"
		type="0004e70497c5ab5598e782b7-text/javascript"></script>
	<script src="static/js/custom.js"
		type="0004e70497c5ab5598e782b7-text/javascript"></script>
	<script async="" src="static/js/js.js"
		type="0004e70497c5ab5598e782b7-text/javascript"></script>
	<script type="0004e70497c5ab5598e782b7-text/javascript">window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag("js", new Date()); gtag("config", "UA-166033648-1");</script>
	<script src="static/js/rocket-loader.min.js"
		data-cf-settings="0004e70497c5ab5598e782b7-|49" defer="">
	</script>
	
	<!-- jquery vue -->
	<script src="js/jquery-3.6.0.js"></script>
	<script src="js/vue.js"></script>
	<script src="js/axios.min.js"></script>
	<script src="js/show-dialog.js"></script>
	<script>
		/**
		 * Author         : CheneyLiu
		 * Date           : date
		 * isAuto:        true, 自动播放
		 * transTime:     3000, 自动播放间隔
		 * animateSpeed:  1000,  动画速度
		 * sliderMode:    'slide', 类型//'slide | fade',
		 * pointerControl: true, 指示器开关
		 * pointerEvent:  'click', 指示器类型//'hover' | 'click',
		 * arrowControl:  true, 左右控制
		 */
		;(function($) {
			$.fn.Slider = function(options) {
				"use strict";

				var settings = $.extend({
					isAuto: true,
					transTime: 4000,
					animateSpeed: 1000,
					sliderMode: 'slide', //'slide | fade',
					pointerControl: true,
					pointerEvent: 'click',//'hover' | 'click',
					arrowControl: true,
				}, options);
				var interval;
				var isAnimating     = false;
				var $slider         = $(this);
				var $sliderWrap     = $slider.find('.slider-inner');
				var sliderCount     = $sliderWrap.find('> .item').length;
				var sliderWidth     = $slider.width();
				var currentIndex    = 0;

				var sliderFun = {
					controlInit: function() {
						// pointerControl
						if (settings.pointerControl) {

							var html = '';
							html += '<ol class="slider-pointer">';
							for (var i = 0; i < sliderCount; i++) {
								if (i == 0) {
									html += '<li class="active"></li>'
								}else{
									html += '<li></li>'
								}
							}
							html += '</ol>'
							$slider.append(html);
							// 指示器居中
							var $pointer = $slider.find('.slider-pointer');
							$pointer.css({
								left: '50%',
								marginLeft: - $pointer.width()/2
							});
						}
						// pointerControl
						if (settings.arrowControl) {
							var html = "";
							html += '<span class="slider-control prev">&lt;</span>';
							html += '<span class="slider-control next">&gt;</span>'
							$slider.append(html);
						}
						$slider.on('click', '.slider-control.prev', function(event) {
							sliderFun.toggleSlide('prev');
						});
						$slider.on('click', '.slider-control.next', function(event) {
							sliderFun.toggleSlide('next');
						});
					},
					// slider
					sliderInit: function() {
						sliderFun.controlInit();
						// 模式选择
						if (settings.sliderMode == 'slide') {
							// slide 模式
							$sliderWrap.width(sliderWidth * sliderCount);
							$sliderWrap.children().width(sliderWidth);
						}else{
							// mode 模式
							$sliderWrap.children().css({
								'position': 'absolute',
								'left': 0,
								'top': 0
							});
							$sliderWrap.children().first().siblings().hide();
						}
						// 控制事件
						if (settings.pointerEvent == 'hover') {
							$slider.find('.slider-pointer > li').mouseenter(function(event) {
								sliderFun.sliderPlay($(this).index());
							});
						}else{
							$slider.find('.slider-pointer > li').click(function(event) {
								if (currentIndex != $(this).index()) {
									sliderFun.sliderPlay($(this).index())
								}
							});
						}
						// 自动播放
						sliderFun.autoPlay();
					},
					// slidePlay
					sliderPlay: function(index) {
						sliderFun.stop();
						isAnimating = true;
						$sliderWrap.children().first().stop(true, true);
						$sliderWrap.children().stop(true, true);
						$slider.find('.slider-pointer').children()
								.eq(index).addClass('active')
								.siblings().removeClass('active');
						if (settings.sliderMode == "slide") {
							// slide
							if (index > currentIndex) {
								$sliderWrap.animate({
									left: '-=' + Math.abs(index - currentIndex) * sliderWidth + 'px'
								}, settings.animateSpeed, function() {
									sliderFun.stop();
									isAnimating = false;
									sliderFun.autoPlay()
								});
							} else if (index < currentIndex) {
								$sliderWrap.animate({
									left: '+=' + Math.abs(index - currentIndex) * sliderWidth + 'px'
								}, settings.animateSpeed, function() {
									isAnimating = false;
									sliderFun.autoPlay();
								});
							} else {
								return;
							}
						}else{
							// fade
							if ($sliderWrap.children(':visible').index() == index) return;
							$sliderWrap.children().fadeOut(settings.animateSpeed)
									.eq(index).fadeIn(settings.animateSpeed, function() {
								isAnimating = false;
								sliderFun.autoPlay();
							});
						}
						currentIndex = index;
					},
					// toggleSlide
					toggleSlide: function(arrow) {
						if (isAnimating) {
							return;
						}
						var index;
						if (arrow == 'prev') {
							index = (currentIndex == 0) ? sliderCount - 1 : currentIndex - 1;
							sliderFun.sliderPlay(index);
						}else if(arrow =='next'){
							index = (currentIndex == sliderCount - 1) ? 0 : currentIndex + 1;
							sliderFun.sliderPlay(index);
						}
					},
					// autoPlay
					autoPlay: function() {
						if (settings.isAuto) {
							interval = setInterval(function () {
								var index = currentIndex;
								(currentIndex == sliderCount - 1) ? index = 0: index = currentIndex + 1;
								sliderFun.sliderPlay(index);
							}, settings.transTime);
						}else{
							return;
						}
					},
					//stop
					stop: function() {
						clearInterval(interval);
					},
				};
				sliderFun.sliderInit();
			}
		})(jQuery);
		jQuery(document).ready(function($) {
			$('#slider').Slider();
		});


	     let app1 = new Vue({
	    	 el:'.cbt',
	    	 data:{
	    		 topBdTenders:[],
	    		 newPosts:[],
				 hotPosts:[],
	    		 replyPosts:[]
	    	 },
	    	 methods:{
	    		 toDetails(item){
					let id = item.id
					item.viewCount++;
					//sessionStorage.setItem("id",id);
	    			window.open("single.html?" + id);
	    		 },
	    		 goToPost(item){
					 let id = item.id
	    			 sessionStorage.setItem("pno",pno);
	    			 window.open("single.html");
	    		 }
	    	 },
	    	 mounted:function(){
	    		// if(sessionStorage.getItem("nickName") != "undefined" && sessionStorage.getItem("nickName") != null){
			 	//  		$("#toLogin").html(sessionStorage.getItem("nickName"));
			 	//  		$("#toLogin").attr("href","contact.html");
			 	//  		$("#exitLogin").css("display","block");
			 	// }
	    		//
	    	    axios.get("/tender/getNewTender",{}).then(resp=>{
	    	    	this.topBdTenders = resp.data.data
	 	 			 console.log(resp)
	 	 		})

				axios.get("/tender/getHotTender",{}).then(resp=>{
					 this.hotPosts = resp.data.data
					 console.log(resp)
				})
	    	    //
	    	    // axios.get("../../post/getNewPosts",{}).then(resp=>{
	 	 		// 	 this.newPosts = resp.data.slice(0,5);
	 	 		// 	 this.newPosts.forEach(item=>{
	 	 		// 		 if(item.photo == null){
	 	 		// 			 item.photo = item.pics.split(";")[0];
	 	 		// 		 }
	 	 		// 	 })
	 	 		// })
	 	 		//
	 	 		// axios.get("../../post/getByReplyNum",{}).then(resp=>{
	 	 		// 	 this.replyPosts = resp.data.slice(0,9);
	 	 		// 	 this.replyPosts.forEach(item=>{
	 	 		// 		 if(item.photo == null){
	 	 		// 			 item.photo = item.pics.split(";")[0];
	 	 		// 		 }
	 	 		// 	 })
	 	 		// })
	    	 }
	     })

		let cbt = new Vue({
			el:'#chw',
			data:{
				cbt:[]
			},
			methods:{
				search(){
					let title = $("#searchContent").val();
					sessionStorage.setItem("searchContent",title);
					window.open("searchPost.html");
				}
			},
			mounted:function(){

			}
		})

		$('#phoneSearch').keydown(function(e){
			if(e.keyCode==13){
				let title = $("#phoneSearch").val();
				sessionStorage.setItem("searchContent",title);
				window.open("searchPost.html");
			}
		});
	</script>
</body>
</html>
